package com.yuxi.Dao.Impl;

import java.io.Serializable;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.yuxi.Dao.PowerModuleDao;
import com.yuxi.Entity.PowerModule;
import com.yuxi.Request.Page;

@Repository
public class PowerModuleDaoImpl extends BaseDaoImpl<Serializable, Serializable> implements PowerModuleDao {
	private Logger logger=LoggerFactory.getLogger(PowerModuleDaoImpl.class);
	public PowerModuleDaoImpl(){
		super(PowerModule.class);
	}
	@Override	
	public PowerModule getModule(Integer pModuleId) {
		// TODO Auto-generated method stub
		return (PowerModule) super.get(pModuleId);
	}

	@Override
	public void modifly(PowerModule pModule) {
		// TODO Auto-generated method stub
		super.update(pModule);
	}
	
	@Override
	public PowerModule getModuleByName(String name) {
		// TODO Auto-generated method stub
		return (PowerModule) super.find("from PowerModule where name=?", name).get(0);
	}
	@Override
	public List<PowerModule> getAllModule() {
		// TODO Auto-generated method stub
		return super.find("from PowerModule");
	}

}
